A. Prints 2.5
B. Raises an exception
C. Raises an error as STATIC is used as a variable which is a keyword
D. None of these
Advertisement
Related Mcqs:
- What is the output for the below code ? public class Test{public static void main(String[] args){int i = 010; int j = 07;System.out.println(i); System.out.println(j); } } ?
- A. 7 8 B. 8 7 C. 9 8 D. None...
- What will be output of following program? public class Test{public static void main(String[] args){byte b=127; b++; b++; System.out.println(b); } } ?
- A. 127 B. -127 C. 129 D. -129...
- What will the output of the following program? public class Test{ public static void main(String args[]){float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); } } ?
- A. 0 B. 1 C. 2 D. 3...
- The following program: public class Test{ static boolean is OK; public static void main(String args[]){System.out.print(is OK); } } ?
- A. Prints true B. Prints false C. Will not compile as boolean is not initialized D. Will not compile as boolean can never be static...
- Size of float and double in Java is________________?
- A. 32 and 64 B. 64 and 64 C. 32 and 32 D. 64 and 32...
- Java intermediate code is known as_________________?
- A. Byte code B. First code C. Mid code D. None of above...
- After the compilation of the java source code, which file is created by the JVM ?
- A. .class B. .doc C. .java D. .cdr...
- Which method of the Applet class displays the result of applet code on screen ?
- A. paint() method B. main() method C. run() method D. drawString() method...
- _________ allows java code to run in the JVM to call and be called by native applications ?
- A. JNI B. FJI C. NJI D. JFI...
- Which statement is static and synchronized in JDBC API ?
- A. getConnection() B. executeQuery() C. prepareCall() D. executeUpdate()...
Advertisement